Method/device for rotating an image and printing method/system comprising said method/device for rotating

ABSTRACT

A method for rotating a digital image in order to print a corresponding rotated print image. The method includes i) providing the digital image to be printed on the printing substrate; ii) receiving positioning coordinates of the substrate relative to a first predefined reference; and iii) rotating the image relative to its centre as a function of the positioning coordinates, thus determining a rotated image. According to one aspect, the rotation is performed by means of a technique of mapping between pixels of the rotated image and pixels of the digital image, and calculating a matrix of correspondences between the pixels of the rotated image and the pixels of the digital image. According to another aspect, the matrix is configured to indicate how many pixels of the rotated image correspond to pixels of the digital image.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is the U.S. national stage of InternationalPatent Application PCT/IB2017/051257 filed internationally on Mar. 3,2017, which, in turn, claims priority to Italian Patent Application No.102016000022779 filed on Mar. 4, 2016.

FIELD OF APPLICATION

The present invention relates to a method for rotating an image and acorresponding device for rotating an image.

The present invention further relates to a method for printing an imagecomprising the aforesaid method for rotating, and a system for printingan image comprising the aforesaid device for rotating an image.

The invention makes reference to a rotation of images for printing onprinting media such as, in particular, tiles and the description thatfollows makes reference to this field of application.

PRIOR ART

There are known systems for printing on tiles, for example in a glazingline, which have considerable linear dimensions, reaching as much as 20metres.

Such systems require that all the operations tied to preparing the tilesand printing, including arranging and positioning the tiles andmaintaining them in position, subsequent printing, drying of the inksafter printing etc., take place in sequence in the same system.

Systems of this size are inevitably scarcely flexible and suffer frommultiple problems; for example, a failure in a single station of thesystem will block all production, long durations of one phase of thesystem (for example, a drying phase) will slow down the whole printingprocess, incorrect positioning of the tiles, which compromises theirintegrity, causing cracks or chipping, can determine, at the end of theprocess, printed materials to be rejected.

It is evident that the multiple vulnerabilities of the system, aspresently conceived, result in a potential serious inefficiency of thesame.

In particular, the step of arranging the tiles on a conveyor surface forsubsequent printing is particularly delicate.

Since in the rigid systems of the prior art printing always takes placeat the same point in the system, the tiles must be positioned preciselyin order to receive a print on them. Special centring systems ensurethat the tiles, once arranged on a moving belt, are oriented in such away as to arrive at the printing station with the right orientation; inparticular, these tiles are infed to the system on the belt and made toslide between guides that maintain their orientation. The belt mustnecessarily be aligned with the print heads to prevent this from takingplace according to an incorrect orientation.

By their very nature, tiles are delicate and brittle and easily subjectto chipping if they come into contact with one another during anorientation step; this determines, on the one hand, a potentially highpercentage of rejects, and on the other hand a substantial loss ofefficiency due to the length of time that tiles that will not bedestined for sale because damaged remain nonetheless in the system.

It is therefore crucial, in a system for printing on tiles, once theinitial positioning of the tiles has been determined, to ensure that thepositioning can be correct, in particular so as to render the printingoperation more efficient.

The object of the present invention is to provide a method and a devicefor rotating an image, in particular a printing substrate, which maycontribute to solving the aforesaid problems by overcoming the drawbacksof the prior art.

A further object of the present invention is to provide a method and asystem for printing on a printing substrate, in particular a tile, whichmay contribute to solving the aforesaid problems by overcoming thedrawbacks of the prior art.

A specific object is to provide a method/device for rotating an image,in particular a printing substrate, prepared in a printingmethod/system, which may contribute to solving the aforesaid problems byovercoming the drawbacks of the prior art.

SUMMARY OF THE INVENTION

In a first aspect, the invention comprises a computer-implemented methodfor rotating a digital image in order to print a corresponding rotatedprint image on at least one printing substrate, wherein the methodcomprises the steps of:

providing the digital image to be printed on the at least one printingsubstrate;

receiving positioning coordinates of the printing substrate relative toa first predefined reference;

rotating the image relative to its centre as a function of thepositioning coordinates, thus determining a rotated image;

wherein the rotation is performed by means of a technique of mappingbetween pixels of the rotated image and pixels of the digital image;

calculating a matrix of correspondences between the pixels of therotated image and the pixels of the digital image, wherein the matrix isconfigured to indicate how many pixels of the rotated image correspondto pixels of the digital image;

performing a post-processing comprising the steps of:

-   -   detecting, from the matrix of correspondences, the pixels of the        digital image that have no correspondence with the pixels of the        rotated image;    -   detecting the multiple pixels in the rotated image;    -   remapping the pixels with no correspondence in the digital image        into respective pixels with multiple correspondences in the        rotated image;        wherein the remapping step determines the rotated digital print        image having a preserved distribution of pixels relative to the        digital image. Preferably, the step of remapping the pixels with        no correspondence in the digital image into respective pixels        with multiple correspondences in the rotated image comprises the        steps of:    -   detecting, among the pixels near the pixels with no        correspondence in the digital image, whether there exists a        pixel having a multiple correspondence with pixels of the        rotated image;    -   whether there exists a pixel in the digital image having a        multiple correspondence with pixels of the rotated image, and        copying, in one of the pixels having a multiple correspondence,        the identifier of the pixel of the digital image that has no        correspondence with the pixel of the rotated image.

Preferably, the step of copying, in one of the pixels having a multiplecorrespondence, the identifier of the pixel of the digital image thathas no correspondence with the pixel of the rotated image comprises thesteps of: if, in the original image, the pixel to be remapped, with zerocorrespondences, is nearer to/farther from the origin O (X,Y) relativeto the one mapped twice, copying, in the pixels nearer to/farther fromthe rotated origin O (Xr;Yr), the pixels of the digital image to beremapped.

Preferably, the technique of mapping between pixels of the rotated imageand pixels of the digital image is a backward mapping technique inwhich, starting from the rotated image, one obtains the digital image byrotating the rotated image relative to the centre of the rotated imageitself.

Preferably, the step of detecting, among the pixels near the pixel withno correspondence in the digital image, whether there exists a pixelhaving a multiple correspondence with pixels of the rotated image, isperformed by means of a nearest neighbour technique.

Preferably, the step of rotating the image relative to its centrecomprises the steps of:

-   -   applying a first translation consisting in translating the image        in such a way that the centre of the image coincides with the        origin of a reference rotation system;    -   rotating the image relative to its centre;    -   applying a second translation by translating the rotated image        in such a way that the pixel at the top right coincides with the        origin of the reference rotation system.

In a second aspect, the invention comprises a device for rotating adigital image for printing a corresponding rotated print image on atleast one printing substrate, comprising a processing unit comprising:

a first receiver module configured to receive a digital image to beprinted on the at least one printing substrate;

a second receiver module configured to receive positioning coordinatesof the printing substrate relative to a first predefined reference;

wherein the processing unit further comprises a rotation unitcomprising:

-   -   a rotation module configured to digitally rotate the image        relative to its centre as a function of the positioning        coordinates, thus determining a rotated image, wherein the        rotation is performed by means of a technique of mapping between        pixels of the rotated image and pixels of the digital image;    -   a first calculation module configured to calculate a matrix of        correspondences between the pixels of the rotated image and the        pixels of the digital image, wherein the matrix is configured to        indicate how many pixels of the rotated image correspond to        pixels of the digital image;    -   a second calculation module configured to:    -   detect, from the matrix of correspondences, the pixels of the        digital image that have no correspondence with the pixels of the        rotated image;    -   detect the multiple pixels in the rotated image;    -   remap the pixels with no correspondence in the digital image in        respective pixels with multiple correspondences in the rotated        image;        wherein the remapping step determines the rotated digital print        image having a preserved distribution of pixels relative to the        digital image.

Preferably, the second calculation module, in the step of remapping thepixels with no correspondence in the digital image in respective pixelswith multiple correspondences in the rotated image, is configured to:

-   -   detect, among the pixels near the pixel with no correspondence        in the digital image, whether there exists a pixel having a        multiple correspondence with pixels of the rotated image;    -   whether there exists a pixel in the digital image having a        multiple correspondence with pixels of the rotated image, and        copy, in one of the pixels having a multiple correspondence, the        identifier of the pixel of the digital image that has no        correspondence with the pixel of the rotated image.

Preferably, the second calculation module, in the step of copying, inone of the pixels having a multiple correspondence, the identifier ofthe pixel of the digital image that has no correspondence with the pixelof the rotated image, is configured to perform the step of: if, in theoriginal image, the pixel to be remapped, with zero correspondences, isnearer to/farther from the origin O (X,Y) relative to the one mappedtwice, copying, in the pixel nearer to/farther from the rotated originO(Xr;Yr), the pixel of the digital image to be remapped.

In a third aspect, the invention describes a method of digital printingon printing substrates comprising the steps of:

providing at least one printing substrate;

-   -   providing a digital image to be printed on the at least one        printing substrate;    -   providing a printing apparatus comprising at least one printing        support bar which supports a plurality of print heads,        configured to print the digital image on the at least one        printing substrate;    -   feeding, with a random orientation, the at least one printing        substrate to the printing apparatus on a conveyor surface, at a        selectable speed and in a predefined direction;    -   locating the at least one printing substrate infed to the        printing apparatus on the conveyor surface, thereby determining        coordinates for locating the printing substrate relative to a        first predefined reference;    -   rotating the digital image as a function of the positioning        coordinates of the printing substrate, thereby determining a        rotated digital print image for the printing substrate;        preferably the rotation is performed according to the method        described in the first aspect of the invention.    -   printing the rotated print image on the printing substrate,        maintaining the orientation of the printing medium unchanged        relative to a second predefined reference, wherein the printing        operation is performed by the plurality of print heads.

Preferably, there is envisaged a step of aligning the first predefinedreference with the second predefined reference;

Preferably, in the step of locating the at least one printing substrate,the first predefined reference is the reference system of the secondacquisition means.

Preferably, the second predefined reference is one between:

the reference system of a printing support bar;

-   -   the reference system of a plurality of printing support bars.

Preferably, the aligning step comprises:

feeding a printing substrate towards the printing apparatus, andprinting a first pattern on the printing substrate;

again feeding the printing substrate towards the printing apparatus,locating the first pattern on the printing substrate and printing asecond pattern on the printing substrate;

again feeding the printing substrate towards the printing apparatus,locating the first pattern on the printing substrate and printing asecond pattern on the printing substrate;

determining a matrix of roto-translation between the two patterns,thereby determining a matrix of roto-translation between the firstreference and the second reference.

In a fourth aspect, the invention discloses a computer-implementedmethod comprising one or more of the steps of the method described inthe third aspect of the invention.

In a fifth aspect, the invention describes a system for digital printingon printing substrates comprising

an insertion interface configured to receive a digital image to beprinted on at least one printing substrate;

a conveyor surface configured to convey a printing substrate with arandom orientation towards a printing apparatus at a selectable speedand in a predefined direction;

the printing apparatus comprising at least one printing support barwhich supports a plurality of print heads configured to print thedigital image on the at least one printing substrate;

a locating device, positioned on the infeed side of the apparatus, andconfigured to locate the at least one printing substrate moving with arandom orientation on the conveyor surface, thereby determining locationcoordinates of the printing substrate relative to a first predefinedreference; a processing unit, in data connection with the printingapparatus and with the locating device, comprising:

-   -   a rotation module configured to rotate the digital image as a        function of the positioning coordinates of the printing        substrate, thereby determining a rotated digital print image for        the printing substrate; preferably, the rotation is carried out        by means of the device described in the second aspect of the        invention.

The plurality of print heads is configured to print the digital image onthe at least one printing substrate.

Preferably, the processing unit comprises an alignment module configuredto align the first predefined reference with the second predefinedreference.

Preferably, the first predefined reference is the reference system ofthe second acquisition means.

Preferably, the second predefined reference is one between:

-   -   the reference system of a printing support bar;    -   the reference system of a plurality of printing support bars.

Providing, in accordance with the invention, a precise location of aprinting substrate enables precise, reliable processing of the datarelated to the printing substrate.

Providing, in accordance with the invention, a precise rotation of animage for a printing substrate enables precise, reliable processing ofthe data related to the printing substrate and to the image itself.

Providing, in accordance with the invention, a precise rotation ofimages for printing substrates which ensures a precise positioning ofimages to be printed on the printing substrates, in particular apositioning on the printing substrates at the entry of a printingapparatus, enables the subsequent control and printing steps to beoptimised, thus ensuring a more efficient and flexible printingsystem/method.

In particular, the invention, as described, achieves the followingtechnical effects, as compared to the prior art:

-   -   precise and reliable processing of the data related to the        printing substrate and to the image itself due to the precise        rotation of the image; in other words, given the high        reliability of the image rotation process, the image can be        intended for very complex printing requiring high precision.    -   less risk of damaging the printing substrates due to the lack of        any need to rotate them mechanically in order to correct their        orientation;    -   less risk of damaging the printing substrates because no passage        between guides is necessary to maintain the orientation of the        substrates, nor is there any contact with guides;    -   lack of any need to have incoming substrates oriented in an        optimal manner, which makes it possible to considerably reduce        the time of providing the printing substrates and printing        times;    -   separability of the stations making up the system, which ensures        the possibility of having several stations of the system work in        parallel or remotely, with the following advantages:        -   possibility of using stations made by different            manufacturers in a same system, thus enabling a            synchronisation thereof and making the structuring of the            system as “modular” as possible;        -   production efficiency, by virtue of the fact that production            times are no longer dependent on the sum of the times of            stations arranged in series in the system and separable            neither physically, nor in terms of sequential timing;        -   more efficient maintenance, by virtue of the fact that one            station can undergo inspection without blocking the others;        -   a better reaction to malfunctions, by virtue of the fact            that a malfunction in one station will not block the entire            system, as the station can be momentarily replaced by            another similar one.

The aforementioned technical effects/advantages and other technicaleffects/advantages of the invention will emerge in further detail fromthe description provided herein below of an example embodiment providedby way of approximate and non-limiting example with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic view of a device for locating a printing substrateaccording to the invention.

FIG. 2 is a block diagram of a specific unit of the device shown in FIG.1.

FIG. 3 is a side view of an embodiment of the device for locating aprinting substrate according to the invention.

FIG. 4 is a diagram comparing between reference systems.

FIG. 5 is a logic diagram of a step of the method of the invention.

FIG. 6 is a logic diagram of a detail of the step of the method of theinvention shown in FIG. 5.

FIG. 7 is a top schematic view of a printing system of the invention,comprising a plurality of printing stations, and positioned downstreamof the locating device of FIG. 1.

FIG. 8 is a schematic side view of the printing system of FIG. 7.

FIG. 9 is a block diagram of a device/method for rotating an image for aprinting substrate, according to the invention.

FIG. 10 describes details of the device/method of FIG. 9.

DETAILED DESCRIPTION

The present invention relates to a method and device for rotating animage for a printing substrate, in particular in order to provide amethod and system for digital printing on printing substrates, be theyrigid or flexible.

In a preferred embodiment, described below, the printing substratescomprise ceramic substrates, particularly tiles.

Printing on ceramics is used both to create a coloured motif, withdecorative inks, and to translate “material” effects into reality withmaterial inks.

With reference to FIG. 1, it shows a locating device 100 for locatingthe aforesaid printing substrate 1, wherein the substrate is moving on aconveyor surface 5 at a selectable speed V_sel and in a feed directionDir. The locating device 100 further comprises an illumination means 4for illuminating the printing substrate 1, configured to emit a lightbeam b1 incident on the conveyor surface 5 according to a predeterminedangle β. Preferably, the predetermined angle β is an angle comprisedbetween 25° and 50°, more preferably between 30° and 45°.

In one embodiment of the invention, the angle of incidence is 90°: thisin the case of a machine for printing on reflective media such as, forexample, sheets of glass.

In a preferred embodiment of the invention, the illumination means 4comprises a LED-type illuminator, preferably with a concentriccylindrical lens.

The light beam b1 generated appears as a linear stripe, orthogonal tothe feed direction Dir.

The technical effect achieved is an illumination of the visual field ofthe camera during the acquisition of the printing substrate 1. Theposition of the illuminator and the particular angle present between thelight beam b1 and the conveyor surface 5 are selected so as to maximisethe illumination of the surface of the printing substrate 1 and minimisethe illumination of the conveyor surface 5.

The device further comprises acquisition means 2,3 configured to acquirea predetermined plurality of lines NL of the printing substrate 1 inmovement, as a function of a line frequency FL which is defined in turnas a function of an acquisition rate V_det.

In a preferred embodiment of the invention, the line frequency FL isproportional to the acquisition rate V_det.

In other words, the acquisition means 2,3 provide a singletwo-dimensional image I_PR formed by the concatenation of thepredetermined number NL of lines acquired at a line frequency FLdetermined as a function of the acquisition rate V_det.

Preferably, the acquisition of the primary image I_PR of the printingsubstrate 1 takes place as a function of a Start acquisition activationsignal.

From an analysis of the primary image I_PR, the invention derives theprofile of the edges, represented by points Pi described below, and fromthe profile of the edges it derives the vertex point and angles of thesubstrate 1.

In a preferred embodiment of the invention, the acquisition means 2,3comprise a first acquisition means 2, in particular a high-precisionphotocell.

According to the invention, the first acquisition means 2 is configuredto detect a front 1A of the printing substrate 1 advancing on theconveyor surface 5 in the feed direction Dir.

Furthermore, the first acquisition means 2 is configured to generate theStart activation signal as a function of the detection that has takenplace. In a preferred embodiment of the invention, the acquisition means2,3 further comprise a second acquisition means 3, in particular ahigh-resolution camera.

Preferably, the camera has a fixed-focus lens set on the plane of theprinting substrate 1, usually at a distance of from 0.5 to 1.4 mm fromthe rest surface; a good depth of field of the lens ensures that thefocus is acceptable under any conditions.

Preferably, the camera is placed orthogonally to the direction of motionDir so as to be able to reconstruct an image by successive scans.

The second acquisition means 3 is configured to acquire a predeterminedplurality of lines NL of the printing substrate 1.

With reference to FIG. 1, the acquisition means 3 preferably comprisesan activation module 31 configured to activate the acquisition.

According to the invention, the first acquisition means 2 is furtherconfigured to send the Start activation signal to the activation module31 based on the detection of the front 1A.

The activation module 31 is configured to remain always on standby for anew Start activation signal.

With particular reference to FIG. 2, the invention comprises aprocessing unit 6 in data connection at least with the acquisition means2,3.

In particular, the processing unit 6 is connected to the acquisitionmeans via a high-speed connection.

In general, it should be noted that in the present context and in thesubsequent claims, the processing unit 6 is presented as being splitinto distinct functional modules (storage modules and operative modules)for the sole purpose of describing its functionalities clearly andcompletely.

In actual fact, this processing unit 6 can comprise a single electronicdevice, appropriately programmed to perform the functionalitiesdescribed, and the different modules can correspond to hardware entitiesand/or routine software that are part of the programmed device.

Alternatively, or in addition, such functions may be performed by aplurality of electronic devices over which the aforesaid functionalmodules can be distributed.

The processing unit 6 can also make use of one or more processors forexecuting the instructions contained in the storage modules.

The aforementioned functional modules can also be distributed overdifferent local or remote computers, depending on the architecture ofthe network in which they reside.

The processing unit 6 is configured to process data representative ofthe position and conformation of printing substrates based on thepredetermined plurality of lines NL acquired by the acquisition means2,3. The processing unit 6 will be described in detail with reference toFIG. 2. The processing unit 6 comprises a receiver module 60 configuredto receive the predetermined plurality of lines NL acquired by theacquisition means 2,3.

According to the invention, the processing unit 6 comprises a generationmodule 61 configured to generate a primary image I_PR as a function ofthe acquired predetermined plurality of lines NL.

According to the invention, the processing unit 6 comprises a detectionmodule 62, in data connection with the generation module 61, andconfigured to detect, from the generated primary image I_PR, a pluralityof points Pi representative of the printing substrate 1, wherein thecoordinates of the plurality of points Pi are expressed in relation to afirst predefined reference Ref.

The processing unit 6 further comprises a first processing module 63configured to receive, as input, the selectable speed V_sel, calculate arate of acquisition V_det of the predetermined plurality of lines NL andsend the acquisition rate V_det to the acquisition means 2,3 (FIGS. 1and 2). According to the invention, the first processing module 63 isconfigured to calculate the rate of acquisition V_det of thepredetermined plurality of lines NL as a function of the selectablespeed V_sel.

In other words, V_det=f (V_Sel).

In a preferred embodiment of the invention, V_det=V_Sel.

Based on what is computed by the first processing module 63, thegeneration module 61 is configured to generate the primary image I_PR asa function of the predetermined plurality of lines NL acquired at theacquisition rate V_det, in turn defined as a function of the selectablespeed V_sel.

In a preferred embodiment of the invention, V_det is represented by apulse train signal.

According to the invention, the acquisition rate V_det represented by apulse train signal is synchronous with the signal representative of theselectable speed V_sel.

The processing unit 6 comprises a locating module 65 configured toreceive, as input, the plurality of representative points Pi andcalculate location coordinates Xi″,Yi″,αi″ of the printing substrate 1relative to the first predefined reference Ref as a function of theplurality of representative points Pi.

According to the invention, the calculation is made by interpolation ofthe representative points Pi.

According to the invention, the representative points Pi of the printingsubstrate 1 are positioned on edges of the substrate 1, preferably onthe horizontal and vertical edges of the printing substrate.

In other words, the locating module 65 is configured to analyse, bymeans of artificial vision algorithms, the generated primary image I_PRand to detect the vertex position and angle that the incoming printingsubstrate forms relative to the reference system.

In particular, scanning of the image takes place in the direction ofmotion Dir of the conveyor surface 5, synchronously with the pulse traingenerated as a function of the selectable speed V_sel.

Preferably, the framed area is about 130×130 mm, more preferably it isabout 100×100 mm and can be set based on the format of the printingsubstrate.

The printing substrate is considered like a two-dimensional rectangle,the thickness being negligible compared to the other dimensions; theframed area contains one of the corners of the substrate, generally thetop left or right corner. The side must appear with a minimal backgroundedge in order that the vertex can be correctly detected.

A composition of successive readings of the representative points Pienables the determination of the location coordinates Xi″,Yi″,αi″ of theprinting substrate 1 relative to the predefined reference Ref.

In a preferred embodiment of the invention, the first predefinedreference Ref is the reference system of the second acquisition means 3,consisting, in particular, of a camera.

The reference system Ref is shown in FIG. 4 together with the otherreference systems which will be described below.

With reference to FIG. 3, according to the invention, the secondacquisition means 3 and the illumination means 4 are positioned on alinear guide 8 moved by a movement means 9, in particular ahigh-precision motor.

The technical effect achieved is the positioning, with absoluterepeatability, of the acquisition means 3 in proximity to the workingposition, i.e. in proximity to an acquisition point P_det of thepredetermined plurality of lines NL.

The resulting advantage is the possibility of managing printingsubstrate formats that are very different from one another; in thesecases, in fact, once the format is detected, the invention envisagesthat the acquisition point P_det of the predetermined plurality of linesNL is moved accordingly so that the images of the substrate of thedetected format are correctly acquired.

In other words, with reference to FIG. 3, the locating device 100comprises the linear guide (8), coupled to the second acquisition means3, and configured to guide the second acquisition means 3, therebyidentifying various points of acquisition Pdet of the predeterminedplurality of lines NL.

In FIG. 3, the feed direction Dir of the conveyor surface 5 “exits” thesheet orthogonally, towards an observer, away from the plane in whichthe sheet lies; consequently, the printing substrate 1 moves in adirection of “exiting” the sheet, towards an observer, away from theplane in which the sheet lies.

The device further comprises the movement means 9 associated with theconveyor surface 5, and configured to move the linear guide 8 relativeto the feed direction Dir.

According to the invention, the movement means 9 is configured to movethe linear guide 8 substantially transversely relative to the feeddirection Dir.

According to the invention, one or more of the second acquisition means3 and the illumination means 4 are/is coupled to the linear guide 8 insuch a way that a movement of the guide determines a variation inposition of at least one between the second acquisition means 3 and theillumination means 4, relative to conveyor surface 5.

According to the invention, the first acquisition means 2 is configuredto detect a format Fs of the printing substrate 1 moving on the conveyorsurface 5 in the feed direction Dir.

The first acquisition means 2 is further configured to send to theprocessing unit 6 a format signal S_Fs representative of the detectedformat Fs (FIGS. 1 and 2).

The processing unit 6 comprises a movement module 64 configured toreceive the format signal S_Fs and activate the movement means 9 in sucha way as to vary the position of at least one between the secondacquisition means 3 and the illumination means 4, relative to the feeddirection Dir, as a function of the format signal S_Fs, thereby varyingthe points of acquisition Pdet of the predetermined plurality of linesNL.

Preferably, the movement module 64 is configured to activate themovement means 9 in such a way as to vary the position of at least onebetween the second acquisition means 3 and the illumination means 4,substantially transversely relative to the feed direction Dir, as afunction of the format signal S_Fs, thereby varying the points ofacquisition Pdet of the predetermined plurality of lines NL.

The technical effect achieved is a rapid, precise identification of thedimensions of the printing substrate and of the corresponding optimalacquisition point Pdet for the acquisition of the correspondingpredetermined plurality of lines NL.

The device described thus far makes it possible to achieve thefunctionality of a corresponding method of locating a printing substrate1 moving on a conveyor surface 5, wherein the method comprises the stepsof:

-   -   providing the printing substrate 1 moving on a conveyor surface        5 at a selectable speed V_sel and in a feed direction Dir;    -   acquiring a predetermined plurality of lines NL of the printing        substrate 1 in movement, as a function of a line frequency FL        defined, in turn, as a function of an acquisition rate V_det;    -   generating a primary image I_PR as a function of the acquired        predetermined plurality of lines NL;    -   detecting, from the generated primary image I_PR, a plurality of        representative points Pi of the printing substrate 1, wherein        the coordinates of the plurality of points Pi are expressed in        relation to a first predefined reference Ref;    -   calculating location coordinates Xi″,Yi″,αi″ of the printing        substrate 1 relative to the first predefined reference Ref, as a        function of the plurality of representative points Pi.

According to the invention, the step of acquiring the predeterminedplurality of lines NL is performed based on the reception of a Startactivation signal.

According to the invention, the step of generating the primary imageI_PR as a function of the acquired predetermined plurality of lines NLis performed at the acquisition rate V_det defined as a function of theselectable speed V_sel.

In particular, the acquisition rate V_det is represented by a pulsetrain signal synchronous with the signal representative of theselectable speed V_sel.

A composition of successive readings of the representative points Pienables the determination of the location coordinates Xi″,Yi″,αi″ of theprinting substrate 1 relative to the predefined reference Ref.

According to the invention, the representative points Pi of the printingsubstrate 1 are positioned on the edges of the substrate 1, preferablyon the horizontal and vertical edges of the printing substrate.

According to the invention, the first predefined reference Ref is thereference system of the second acquisition means 3, consisting inparticular of a camera.

Other steps of the method coincide with the functions of the operatingmodules of the processing unit 6 or of the components of theabove-described locating device 100 and they perform other steps of themethod depending on the ones illustrated.

The invention also comprises a method of digital printing on printingsubstrates which, among the steps provided for, also comprises thelocation of a printing substrate 1 as achieved by the method justdescribed.

The invention also comprises a corresponding system for digital printingon printing substrates which comprises the locating device 100

The invention envisages providing at least one printing substrate 1; forthe sake of simplicity, reference will be made to a single substrate inthe course of the discussion.

With reference to FIG. 1, the invention in fact comprises the conveyorsurface 5 configured to convey at least one printing substrate 1 towardsa printing apparatus 200 at a selectable speed V_sel and in a predefineddirection Dir.

For the sake of simplicity, reference will be made hereinafter to oneprinting substrate 1, though this is not intended to mean that only asingle substrate can be conveyed at a time.

In particular, the invention comprises feeding, with a randomorientation, the printing substrate 1 towards the printing apparatus 200on the conveyor surface 5, at a selectable speed V_sel and in thepredefined direction Dir;

The invention comprises providing a digital image I_dgt to be printed onthe printing substrate 1.

To this end, the printing system of the invention comprises an insertioninterface 300 (FIG. 1) configured to receive the digital image I_dgt tobe printed on the printing substrate 1.

The printing apparatus 200 comprises at least one printing support bar201,202,203,204 which supports a plurality of print heads 201 i,202i,203 i,204 i, configured to print the digital image I_dgt on the atleast one printing substrate 1.

The invention further comprises locating the printing substrate 1 infedto the printing apparatus 200 on the conveyor surface 5, therebydetermining location coordinates Xi″,Yi″,αi″ of the printing substrate 1relative to the first predefined reference Ref.

This step is implemented by means of the locating device 100.

The locating device and method were described previously.

In order to print an image correctly on the printing substrate, it isnecessary to perform an alignment between the substrate and the image.According to the prior art, the alignment can be achieved by acting onthe printing substrate, moving it physically (e.g. by means of theguide). According to the invention, the alignment is achieved by actingon the image and modifying it via software.

The technical effect achieved is to render the printing processindependent of the position of the substrates infed to the printingapparatus, for example in order to limit mechanical intervention andreduce the number of necessary parts.

If the substrates were always correctly oriented, it would suffice toapply a transversal translation of the image relative to the printingbar, according to the position of the substrates on the conveyorsurface.

However, the substrates not being correctly oriented, it is necessary toknow the angle of entry into the machine, which corresponds to therotation angle to be applied to the image.

The locating device previously described thus serves to calculate thisangle as well, in addition to the position of the vertex.

In the case of rectangular (and square) shaped tiles, which aresymmetrical if rotated by 180°, it is possible to limit the range of theangle from −90° to +90°.

In other words, the invention makes it possible to locate the printingsubstrate 1 infed to the printing apparatus 200 on the conveyor surface5, thereby determining location coordinates Xi″,Yi″,αi″ of the printingsubstrate 1 relative to the first predefined reference Ref.

More precisely, the coordinates Xi″,Yi″ represent the vertex of theprinting substrate 1 relative to the first predefined reference Ref,whilst αi is the angle of entry of the printing medium into the machinewhich corresponds to the angle of rotation to be applied to the image.

The invention further comprises rotating the digital image I_dgt as afunction of the positioning coordinates Xi″,Yi″,αi″ of the printingsubstrate 1, thereby determining a rotated digital print imageI_dgt_r_Print for the printing substrate 1.

To this end, the printing system of the invention comprises theprocessing unit 6, in data connection with the printing apparatus 200and with the locating device 100.

The processing unit 6 comprises a rotation module 67 configured torotate the digital image I_dgt as a function of the positioningcoordinates Xi″,Yi″,αi″ of the printing substrate 1, thereby determininga rotated digital print image I_dgt_r_Print for the printing substrate1; In order to rotate the digital image I_dgt, the invention comprises acomputer-implemented rotation method.

The method for rotating a digital image I_dgt generates a print of acorresponding rotated print image I_dgt_r_Print on at least one printingsubstrate 1.

With reference to FIGS. 9 and 2, the invention comprises a step ofinputting data which prepares the digital image I_dgt to be printed onthe at least one printing substrate 1 and receives positioningcoordinates Xi″,Yi″,αi″ of the printing substrate 1 relative to a firstpredefined reference Ref. For these purposes, with reference to FIG. 9,the processing unit 6 comprises a first receiver module 71 configured toreceive a digital image I_dgt to be printed on the at least one printingsubstrate 1.

The processing unit 6 further comprises a second receiver module 72configured to receive the positioning coordinates Xi″,Yi″,αi″ of theprinting substrate 1 relative to a first predefined reference Ref.

The invention comprises rotating the image I_dgt relative to its centreas a function of the positioning coordinates Xi″,Yi″,αi″, thusdetermining a rotated image I_dgt_r.

Stated in other terms, the processing unit 6 comprises the rotationmodule 67 configured to digitally rotate the image I_dgt relative to itscentre as a function of the positioning coordinates Xi″,Yi″,αi″, thusdetermining a rotated image I_dgt_r.

According to the invention, the step of rotating the image I_dgtrelative to its centre as a function of the positioning coordinatesXi″,Yi″,αi″, comprises the steps of:

-   -   applying a first translation T1 consisting in translating the        image I_dgt in such a way that the centre of the image coincides        with the origin of a reference rotation system;    -   rotating the image relative to its centre;    -   applying a second translation T2 by translating the rotated        image I_dgt_r in such a way that the pixel at the top right        coincides with the origin of the reference rotation system.

In other words, the invention comprises roto-translating the digitalimage of the printing substrate.

The rotation is performed by means of a technique of mapping betweenpixels Px_r_ij of the rotated image I_dgt_r and pixels Px_ij of thedigital image I_dgt.

The invention comprises calculating a matrix of correspondences Mbetween the pixels Px_r_ij of the rotated image I_dgt_r and the pixelsPx_ij of the digital image I_dgt, wherein the matrix is configured toindicate how many pixels Px_r_ij of the rotated image I_dgt_r correspondto pixels Px_ij of the digital image I_dgt; in other words,M=f(I_dgt;I_dgt_r).

For this purpose, a first calculation module 74 is configured tocalculate a matrix of correspondences M between the pixels Px_r_ij ofthe rotated image I_dgt_r and the pixels Px_ij of the digital imageI_dgt, wherein the matrix is configured to indicate how many pixelsPx_r_ij of the rotated image I_dgt_r correspond to pixels Px_ij of thedigital image I_dgt.

There exist various mapping techniques in the literature, such asforward mapping and backward mapping.

In the former, however, it is possible that in the rotated image theremay be so-called “holes” and “folds”, i.e. pixels that have not beenmapped and pixels that have been mapped several times, whose number, inthe case of rotation, will depend on the angle.

For this reason, in general the transformations that use a forwardmapping strategy are not objective.

In order to obtain an image formed by pixels mapped once and only once,it is necessary to use the reverse strategy, called backward mapping,that is, to associate a pixel of the original image with every pixel ofthe rotated image, which corresponds to applying a rotation of the sameangle to the rotated image, but in the opposite direction.

The problem is only partially resolved, however, since the approximationto be applied in backward mapping determines the presence of “holes” and“folds”, this time in the original image.

In other words, some pixels of the original image are not mapped inpixels of the rotated image and consequently others are mapped more thanonce.

By analysing the distribution of correspondences, in particular with thecalculated matrix of correspondences M, it has been seen that a pixelcan be mapped twice at most and the maximum number of pixels mappedtwice occurs with an angle of ±45°.

The incongruence with the original image due to the fact that there isnot 1:1 mapping has repercussions on the rotated image, which proves tobe of inferior quality compared to the original.

In the field of the invention, the depth of colour of the images islimited to 4 levels because only 2 bits are used for each channel (ifnot indeed images with only two levels, with one bit per pixel).

Interpolation between pixels that can take on only 4 (2) differentvalues does not give good results, as it introduces graphicallyinacceptable artefacts.

There is also a variation in tone. In fact, in order to representintermediate tones between the 4 levels used, one acts on thedistribution of the points in the image. This distribution is performedby means of stochastic and error diffusion methods. When the image isrotated, it is necessary to preserve the stochastic distribution of thepoints in order not to alter the tone of the graphics.

In order to enhance the quality of the resulting image and theefficiency of the algorithm, it was thus decided to use the simplestmethod of interpolation, namely, the nearest neighbour method, whichconsists in approximating to the nearest pixels; this can be achieved byrounding the values of the coordinates.

Conventional mapping and interpolation thus do not give an optimalresult in terms of image quality and efficiency of the rotation. Apost-processing is thus necessary.

According to the invention, and with reference to FIG. 10, thepost-processing step comprises the steps of:

detecting, from the matrix of correspondences M, the pixels of thedigital image I_dgt that have no correspondence Px_33 with the pixelsPx_r_ij of the rotated image I_dgt_r;

detecting the pixels with multiple correspondences (Px_r_32,Px_r_33) inthe rotated image I_dgt_r;

remapping the pixels Px_33 with no correspondence in the digital imageI_dgt in respective pixels with multiple correspondences Px_r_32,Px_r_33in the rotated image I_dgt_r;

According to the invention, the remapping step determines the rotateddigital print image I_dgt_r_Print having a preserved distribution ofpixels relative to the digital image I_dgt.

In particular, the post-processing step can be implemented in the device400 by means of a second calculation module 75.

The technical effect achieved is to preserve the stochastic distributionin which all the points have been included only once.

In other words, performing a post-processing by means of a matrix ofcorrespondences M, containing, for every pixel of the original image,the coordinates of the pixels of the rotated image in which the originalimage was mapped, means returning to the source image by considering thepixels of the target image which correspond to pixels in the sourceimage and considering, in the return to the source image, that use canbe made of a nearest neighbour-type interpolation directed at the pixelsnear the pixel considered.

In other words, in order to enhance the quality of the resulting imageand the efficiency of the algorithm, use has been made of the simplestinterpolation method, namely, the nearest neighbour method, whichconsists in approximating to the nearest pixels; this can be achieved byrounding the values of the coordinates.

The technical effect achieved is to preserve the stochastic distributionin which all the points have been included only once.

With reference to FIG. 10, according to the invention, the step ofremapping the pixels Px_33 with no correspondence in the digital imageI_dgt in respective pixels with multiple correspondences Px_r_32,Px_r_33in the rotated image I_dgt_r comprises the steps of:

detecting, among the pixels near, for example the ones adjacent to, thepixel with no correspondence Px_33 in the digital image I_dgt, whetherthere exists a pixel Px_32 that has a multiple correspondence withpixels Px_r_32 and Px_r_33 of the rotated image I_dgt_r;

and whether there exists a pixel Px_32 in the digital image I_dgt havinga multiple correspondence with pixels Px_r_32 and Px_r_33 of the rotatedimage I_dgt_r, and copying, in one of the pixels Px_r_32 and Px_r_33having a multiple correspondence, the identifier of the pixel Px_33 ofthe digital image I_dgt that has no correspondence with the pixelPx_r_ij of the rotated image I_dgt_r.

Advantageously, the step of copying, in one of the pixels Px_r_32 andPx_r_33 having a multiple correspondence, the identifier of the pixelPx_33 of the digital image I_dgt that has no correspondence with thepixel Px_r_ij of the rotated image I_dgt_r comprises the steps of: if,in the original image, the pixel to be remapped (with zerocorrespondences) Px_33 is nearer to/farther from the origin O(X,Y)relative to the one mapped twice Px_32, copying, in the pixels Px_r_32nearer to/Px_r_33 farther from the rotated origin O (Xr;Yr), the pixelsPx_33 of the digital image I_dgt to be remapped.

The technical effect achieved by this last stage is to preserve theright stochastic distribution of all the points in the rotated image.

In other words, the two coordinates found (Px_r_32 and Px_r_33)correspond to two possible targets. The choice of one or the other isperformed in such a way as to preserve the distribution of the pixels ofthe original image in the rotated one, based on the distance of thepixels from the origin of the image: if, in the original image, thepixel to be remapped (with zero correspondences), is nearer to/fartherfrom the origin than the one mapped twice (Px_32), the target pixel willbe the one nearer to/farther from the rotated origin.

Preferably, the technique of mapping between pixels Px_r_ij of therotated image I_dgt_r and pixels Px_ij of the digital image I_dgt is abackward mapping technique in which, starting from said rotated imageI_dgt_r, one obtains said digital image I_dgt by rotating said rotatedimage I_dgt_r relative to the centre of the rotated image itself.

Preferably, the step of detecting, among the pixels near the pixel withno correspondence Px_33 in the digital image I_dgt, whether there existsa pixel Px_32 that has a multiple correspondence with pixels Px_r_32 andPx_r_33 of the rotated image I_dgt_r, is performed by means of a nearestneighbour technique.

As noted above, the post-processing step can be implemented in thedevice 400 by means of a second calculation module 75, as shown in FIG.10.

The second calculation module 75 is configured, in the step of remappingthe pixel Px_33 with no correspondence in the digital image I_dgt inrespective pixels with multiple correspondences Px_r_32,Px_r_33 in therotated image I_dgt_r, to:

detect, among the pixels near (for example the ones adjacent to) thepixels with no correspondence Px_33 in the digital image I_dgt), whetherthere exists a pixel Px_32 that has a multiple correspondence with thepixels Px_r_32 and Px_r_33 of the rotated image I_dgt_r; and whetherthere exists a pixel Px_32 in the digital image I_dgt having a multiplecorrespondence with the pixels Px_r_32 and Px_r_33 of the rotated imageI_dgt_r, and to copy, in one of the pixels Px_r_32 and Px_r_33 having amultiple correspondence, the identifier of the pixel Px_33 of thedigital image I_dgt that has no correspondence with the pixel Px_r_ij ofthe rotated image I_dgt_r.

The second calculation module 75 is further configured, in the step ofcopying, in one of the pixels Px_r_32 and Px_r_33 having a multiplecorrespondence, the identifier of the pixel Px_33 of the digital imageI_dgt that has no correspondence with the pixel Px_r_ij of the rotatedimage I_dgt_r, to perform the step of:

if, in the original image, the pixel to be remapped (with zerocorrespondences) Px_33 is nearer to/farther from the origin O(X,Y)relative to the one mapped twice Px_32, copying, in the pixels Px_r_32nearer to/Px_r_33 farther from the rotated origin O (Xr;Yr), the pixelPx_33 of the digital image I_dgt to be remapped.

More in general, the calculation module 75 is configured to perform allthe processing functions on the pixels described in reference to thepost-processing step described in the method.

At the end of the step of rotating the image to be printed on thesubstrate 1, the image I_dgt_r_Print is ready to be printed with theright orientation on the printing substrate 1 infed to the printingapparatus 200.

In a preferred embodiment of the invention, the printing operation isperformed by the plurality of print heads 201 i,202 i,203 i,204 imounted on at least one printing support bar 201,202,203,204 in apredetermined and fixed position.

In a second embodiment, the invention further comprises translating theat least one printing support bar 201,202,203,204 in the predefineddirection Dir at a translation speed V_tr synchronised with theselectable speed V_sel in such a way that the at least one printingsupport bar 201,202,203,204 follows the movement of the printingsubstrate 1.

In other words, the processing unit 6 comprises the first processingmodule 63 configured to receive, as input, the selectable speed V_seland to generate a translation speed command S_V_tr configured to commanda translation of the at least one printing support bar 201,202,203,204along the predefined direction Dir at a translation speed V_tr.

According to the second embodiment of the invention, the translationspeed V_tr is synchronised with the selectable speed V_sel of theprinting substrate 1.

In particular, the translation speed V_tr coincides with the selectablespeed V_sel of the printing substrate 1.

In the preferred embodiment, the invention comprises printing therotated print image I_dgt_r on the printing substrate 1, maintaining theorientation of the printing substrate 1 unchanged relative to a secondpredefined reference Ref2.

In the preferred embodiment, the invention comprises printing theroto-translated print image I_dgt_T_Print on the printing substrate 1,maintaining the orientation of the printing substrate 1 unchangedrelative to a second predefined reference Ref2.

The second predefined reference Ref2 is the reference of the at leastone printing support bar.

In the second embodiment of the invention, the printing operation isperformed by the plurality of print heads 201 i,202 i,203 i,204 i duringthe translation of the at least one printing support bar(201,202,203,204).

In other words, the printing substrate 1 moves at a speed V_sel wheninfed to the printing apparatus 200 and the at least one printingsupport bar 201,202,203,204 translates at a speed V_tr which coincideswith the speed V_sel.

A communication module 66 in the processing unit 6 is configured totransmit the translation speed command S_V_tr and the rotated printimage I_dgt_r_Print to the at least one printing support bar201,202,203,204.

The plurality of print heads 201 i,202 i,203 i,204 i is configured toprint the digital image I_dgt_r_Print on the at least one printingsubstrate 1 moving at the selectable speed V_sel along the predefineddirection Dir.

In the second embodiment, the printing operation is performed while theprint heads 201 i,202 i,203 i,204 i translate along the predefineddirection Dir at a translation speed V_tr synchronised, in particularcoinciding, with the selectable speed V_sel.

Summing up, the method/printing system of the invention thus enables thelocating device 100 for locating the printing substrates to “dialogue”with the printing apparatus 200.

However, since the reference systems of the locating device 100 and ofthe printing apparatus 200 are different, it is important to “calibrate”the printing system in its entirety in order to make a coherentinteraction between the aforesaid device and the aforesaid apparatuspossible.

For this purpose, the processing unit 6 comprises a calibration module68 associated with the locating module 65.

The calibration module 68 is configured to receive the locationcoordinates Xi″,Yi″,αi″ and make them coherent with the second referencesystem Ref2.

The calibration is performed prior to the operation of rotating theimage to be printed.

Preferably, the calibration operation is performed at the start-up ofthe system configured to operate with a specific type of printingsubstrates 1, i.e. with substrates for printing a predefined size; upona change in the dimensions of the printing substrates, the system willrequire a new calibration.

The purpose of the calibration is therefore to align the firstpredefined reference Ref with the second predefined reference Ref2.

In a preferred embodiment of the invention, in the locating device 100,the first predefined reference Ref is the reference system of the secondacquisition means 3, in particular of the camera.

In a preferred embodiment of the invention, in the printing apparatus200, the second predefined reference Ref2 is the reference system of oneof the printing support bars 201,202,203,204.

In an alternative embodiment of the invention, in the printing apparatus200, the second predefined reference Ref2 is the reference system of aplurality of printing support bars 201,202,203,204.

According to the invention, the aligning step comprises a first sub-stepof feeding a printing substrate 1 with a random orientation on theconveyor surface 5 in the direction of movement Dir towards the printingapparatus 200, and the printing apparatus 200 prints a first pattern Aon the printing substrate 1 with the at least one printing support bar201,202,203,204 in a fixed position in the second predefined referenceRef2, thus also maintaining the print heads 201 i,202 i,203 i,204 i in afixed position.

In other words, once a printing substrate 1 has been fed towards theprinting apparatus 200, the first sub-step enables a first pattern to beprinted on the printing substrate 1.

Preferably, the printing step is preceded by detecting the referencesystem of the at least one printing support bar Ref2.

According to the invention, the aligning step comprises a secondsub-step of again feeding the printing substrate 1 on the conveyorsurface 5 in the direction of movement Dir towards the apparatus 200,locating the first pattern A by means of the locating device 100 andprinting a second pattern B on the printing substrate 1.

In other words, after the printing substrate 1 has again been fedtowards the printing apparatus 200, the second sub-step enables thefirst pattern A to be located and a second pattern B to be printed onthe printing substrate.

According to the invention, the aligning step comprises a third sub-stepof again feeding the printing substrate 1 on the conveyor surface 5 insaid direction of movement Dir towards the apparatus 200 and locatingthe first pattern A and the second pattern B by means of the locatingdevice 100. In other words, the third sub-step enables the first patternA and the second pattern B to be located.

According to the invention, the aligning step comprises a step ofdetermining a matrix of roto-translation M between the two patterns A,B, thereby determining a matrix of roto-translation between the firstreference Ref and the second reference Ref2.

The technical effect achieved is that the alternation of sub-steps ofprinting known patterns and the subsequent acquisition/location thereofenables a 3×3 perspective transformation matrix (translation, rotation,scale, perspective) to be obtained between the location system (firstpredefined reference system Ref) and the single (or multiple) printingbar(s) (second predefined reference Ref2).

Another technical effect achieved is that, given that the “calibration”process is repeated for each printing bar (of a different colour), oneobtains the calibration of each bar with the location system and,because of the transitive property, each print head is calibrated withthe others. This effect makes it possible to avoid mechanically aligningthe print heads in a micrometric manner.

The effect of this approach is that any mechanical misalignment will becompensated for by the electronic calibration.

Going into greater detail, the calibration module receives, as input, aseries of images of the printing substrate 1 acquired/located by thelocating device and outputs a table of calibration values that are savedin the product database.

In the preferred embodiment of the invention, we can consider that inthe system for digital printing on printing substrates, three referencesystems are present:

-   -   first reference system Ref of the second acquisition means 3        (x″,y″), in particular a camera;    -   second reference system Ref2 of the at least one printing        support bar (x,y);    -   third reference system of the printing substrate (x′,y′).

With reference to FIG. 6, for a correct calibration of the system, thetwo patterns indicated by the letters A and B are used. The patternshave the appearance of a matrix of markers easily locatable by thevision software. Each marker is characterised by a direction and a rowand column number that serves to identify it.

The patterns are generated according to the size and resolution of theprinting apparatus: in width they contain a number of points equal tothe number of nozzles. They are in fact integral with the referencesystem of the printing support bar.

The calibration process will now be described in detail.

1. In the first stage of the calibration process, in order to aligndifferent reference systems (for example the first predefined referenceRef and the second predefined reference Ref2) the pattern A is printedon the calibration tile.

It is assumed that the tile has entered the system in a random positionand that the print heads remain on a fixed reference system:

-   -   (x1′, y1′) tile reference system at the first stage;    -   (x, y) printing support bar reference system;        2. In the second stage, the tile is fed back in and scanned by        the camera, processed by the calibration software module and a        position and number are obtained for every marker.

Furthermore, maintaining the position, it is printed with the pattern B.Let us consider:

-   -   (x2′, y2′)≠(x1′, y1′) tile reference system at stage 2    -   (x″, y″) camera reference system    -   (x, y) printing bar reference system        3. In the third stage the tile is fed back in and scanned a        second time.        It is processed by the calibration software module, and a        position and identification number are obtained for every        marker, repeating the operation for the markers of both pattern        A and pattern B. The two patterns are easily distinguishable, as        they are asymmetrical.        Let us consider:    -   (x3′, y3′)≠(x2′, y2′)≠(x1′, y1′) tile reference system at stage        3;    -   (x″, y″) camera reference system;    -   Considering, for the sake of simplicity, a single marker of the        pattern B, let us consider:    -   Pb position of marker B in the printing bar reference system        (x,y) (known a priori);    -   Pb3″ position of marker B in the camera reference system (x″,        y″) (derived by the analysis software) at stage 3.

Having moved the tile between stages 2 and 3, the correct relation isgiven by Pb=F(Pb3″)+G((x3′, y3′)−(x2′, y2′)), where the second addendconsiders the variation the tile reference system has undergone betweenstage 3 and stage 2.

In other words, the second addend represents the transformationcoefficient for bringing the tile reference system of stage 3 to stage2.

In order to evaluate this second transfer function, let us consider thesame marker of pattern A at stage 2 and at stage 3.

Given that the camera reference system has not changed, we can consider:

-   -   P2″ position of marker A in the camera reference system (x″, y″)        at stage 2.    -   P2′ position of marker A in the tile reference system (x2′, y2′)        at stage 2.    -   P3″ position of marker A in the camera reference system (x″, y″)        at stage 3.    -   P1′ position of marker A in the tile reference system (x3′, y3′)        at stage 3. Given that the position of the marker in the camera        reference system has not changed between stage 2 and stage 3, we        can affirm that:

-   P2′=G2

-   (P2″)=P3′=G3 (P3″)

-   P3″=G3G2 (P2″)

This function represents the point variation taking place between stage2 and stage 3.

The final formula can thus be summed up with: P=F(P3″)+G(P2″).

By applying this formula to all the positions P of the markers andordering them, we obtain a relation: [P . . . Pn]=M [P″ . . . Pn″]

From which, through the solution of the problem, we obtain a matrix M ofdimensions [3×3] containing the coefficients of the lineartransformation from the camera reference system to the bar referencesystem.

In conclusion, the invention enables a precise rotation of an image fora printing substrate by enabling precise and reliable processing of thedata related to the printing substrate and the image itself.

Providing, in accordance with the invention, a precise rotation ofimages for printing substrates which ensures a precise positioning ofimages to be printed on printing substrates, in particular a positioningon printing substrates at the entry of a printing apparatus, enables anoptimisation of the subsequent control and printing steps, ensuring amore efficient and flexible printing system/method.

In particular, the invention, as described, achieves the followingtechnical effects, as compared to the prior art:

-   -   precise and reliable processing of the data related to the        printing substrate and to the image itself due to the precise        rotation of the image; in other words, given the high        reliability of the image rotation process, the image can be        intended for very complex printing requiring high precision.    -   less risk of damaging the printing substrates due to the lack of        any need to rotate them mechanically in order to correct their        orientation;    -   less risk of damaging the printing substrates because no passage        between guides is necessary to maintain the orientation of the        substrates, nor is there any contact with guides;    -   lack of any need to have incoming substrates oriented in an        optimal manner, which makes it possible to considerably reduce        the time of providing the printing substrates and printing        times;    -   separability of the stations making up the system, which ensures        the possibility of having several stations of the system work in        parallel or remotely, with the following advantages:        -   possibility of using stations made by different            manufacturers in a same system, thus enabling a            synchronisation thereof and making the structuring of the            system as “modular” as possible;        -   production efficiency, by virtue of the fact that production            times are no longer dependent on the sum of the times of            stations arranged in series in the system and separable            neither physically, nor in terms of sequential timing;        -   more efficient maintenance, by virtue of the fact that one            station can undergo inspection without blocking the others;        -   a better reaction to malfunctions, by virtue of the fact            that a malfunction in one station will not block the entire            system, as the station can be momentarily replaced by            another similar one.

The invention claimed is:
 1. A computer-implemented method for rotatinga digital image for printing a corresponding rotated digital print imageon at least one printing substrate, the method comprising: (a) providinga digital image to be printed on a printing substrate; (b) receivingpositioning coordinates of said printing substrate relative to a firstpredefined reference; (c) rotating said digital image relative to itscentre as a function of said positioning coordinates, thus determining arotated image; wherein said rotation is performed by means of atechnique of mapping between a plurality of pixels of the rotated imageand a plurality of pixels of the digital image; (d) calculating a matrixof correspondences between said plurality of pixels of the rotated imageand said plurality of pixels of the digital image, wherein the matrix isconfigured to indicate how many of said plurality of pixels of therotated image correspond to how many of said plurality of pixels of thedigital image; and (e) performing a post-processing, comprising: i)detecting, from said matrix of correspondences, a plurality of pixels ofthe digital image that have no correspondence with a plurality of pixelsof the rotated image; ii) detecting a plurality of multiple pixels insaid rotated image; and iii) remapping the plurality of pixels of thedigital image that have no correspondence with the plurality of pixelsof the digital image, into respective pixels with multiplecorrespondences in the rotated image; wherein the remapping stepdetermines a rotated digital print image having a preserved distributionof pixels relative to said digital image.
 2. The method according toclaim 1, wherein step (e) iii) comprises: α. detecting, among aplurality of pixels near the plurality of pixels that have nocorrespondence with the plurality of pixels of the digital image, whenthere exists a pixel that has a multiple correspondence with theplurality of multiple pixels of the rotated image; β. detecting whenthere exists a pixel in the digital image having a multiplecorrespondence with the plurality of multiple pixels of the rotatedimage, and γ. copying, in one of the pixels having a multiplecorrespondence with the plurality of multiple pixels of the rotatedimage, the identifier of a pixel of the digital image that has nocorrespondence with a pixel of the rotated image.
 3. The methodaccording to claim 2, wherein step γ comprises: when, in the originalimage, a pixel of the plurality of pixels of the digital image that haveno correspondence with the plurality of pixels of the digital image tobe remapped, is nearer to an origin O (X,Y) relative to a pixel mappedtwice, then copying in the pixels nearer to a rotated origin O(Xr;Yr),the pixels of the digital image to be remapped.
 4. The method accordingto claim 2, wherein step β is performed by means of a nearest neighbourtechnique.
 5. The method according to claim 2, wherein step γ comprises:when, in the original image, a pixel of the plurality of pixels of thedigital image that have no correspondence with the plurality of pixelsof the digital image to be remapped, is farther from an origin O (X,Y)relative to a pixel mapped twice, then copying in the pixels fartherfrom a rotated origin O(Xr;Yr), the pixels of the digital image to beremapped.
 6. The method according to claim 1 wherein said technique ofmapping between the plurality of pixels of the rotated image and theplurality of pixels of the digital image is a backward mapping techniquein which, starting from said rotated image, one obtains said digitalimage by rotating said rotated image relative to the centre of therotated image itself.
 7. The method according to claim 1, wherein saidstep (c) of rotating the digital image relative to its centre as afunction of said positioning coordinates comprises: i) a applying afirst translation translating the image in such a way that the centre ofthe image coincides with the origin of a reference rotation system; ii)rotating the image relative to its centre; and iii) applying a secondtranslation by translating the rotated image in such a way that thepixel at the top right coincides with the origin of the referencerotation system.
 8. A device for rotating a digital image for printing acorresponding rotated print image on at least one printing substrate,having a processing unit comprising: (a) a first receiver moduleconfigured to receive a digital image to be printed on said at least oneprinting substrate; (b) a second receiver module configured to receivepositioning coordinates of said printing substrate relative to a firstpredefined reference; and (c) a rotation unit including: i) a rotationmodule configured to digitally rotate said image relative to its centreas a function of said positioning coordinates, thus determining arotated image, wherein said rotation is performed by means of atechnique of mapping between pixels of the rotated image and pixels ofthe digital image; ii) a first calculation module configured tocalculate a matrix of correspondences between the pixels of the rotatedimage and the pixels of the digital image, wherein the matrix isconfigured to indicate how many pixels of the rotated image correspondto pixels of the digital image; and iii) a second calculation moduleconfigured to: α. detect, from said matrix of correspondences, thepixels of the digital image that have no correspondence with the pixelsof the rotated image; β. detect, in said rotated image, the pixels withmultiple correspondences; γ. remap the pixels with no correspondence inthe digital image in respective pixels with multiple correspondences inthe rotated image; wherein the remapping step determines said rotateddigital print image characterised by a preserved distribution of pixelsrelative to said digital image.
 9. The device according to claim 8,wherein said second calculation module, in step γ is configured to: α.detect, among the pixels near the pixel with no correspondence of thedigital image, when there exists a pixel that has a multiplecorrespondence with pixels of the rotated image; β. detect when thereexists a pixel in the digital image having a multiple correspondencewith pixels of the rotated image, and γ. copy, in one of the pixelshaving a multiple correspondence, the identifier of the pixel of thedigital image that has no correspondence with the pixel of the rotatedimage.
 10. The device according to claim 9, wherein step γ is configuredto perform the step of: when, in the original image, a pixel of theplurality of pixels of the digital image that have no correspondencewith the plurality of pixels of the digital image to be remapped isnearer to the origin O (X,Y) relative to the one mapped twice, thencopying in the pixel nearer to the rotated origin O(Xr;Yr), the pixel ofthe digital image to be remapped.
 11. The device according to claim 9,wherein step γ is configured to perform the step of: when, in theoriginal image, a pixel of the plurality of pixels of the digital imagethat have no correspondence with the plurality of pixels of the digitalimage to be remapped is farther from the origin O (X,Y) relative to theone mapped twice, then copying in the pixel farther from the rotatedorigin O(Xr;Yr), the pixel of the digital image to be remapped.
 12. Amethod of digital printing on printing substrates, comprising: (a)providing at least one printing substrate; (b) providing a digital imageto be printed on said at least one printing substrate; (c) providing aprinting apparatus comprising at least one printing support bar whichsupports a plurality of print heads, configured to print said digitalimage on sale at least one printing substrate; (d) feeding, with arandom orientation, said at least one printing substrate to saidprinting apparatus on a conveyor surface, at a selectable speed and in apredefined direction; (e) locating said at least one printing substrateinfed to said printing apparatus on said conveyor surface, therebydetermining location coordinates of said printing substrate relative toa first predefined reference; (f) rotating said digital image as afunction of said positioning coordinates of said printing substrate,thereby determining a rotated digital print image for said printingsubstrate in accordance with claim 1, and (g) printing said rotatedprint image on said printing substrate, maintaining the orientation ofsaid printing medium unchanged relative to a second predefinedreference.
 13. The method according to claim 12, comprising: aligningthe first predefined reference with the second predefined reference. 14.The method according to claim 13, wherein said aligning step comprises:(a) feeding a printing substrate towards said printing apparatus andprinting a first pattern (A) on said printing substrate; (b) againfeeding said printing substrate towards said printing apparatus,locating said first pattern (A) on said printing substrate, and printinga second pattern (B) on said printing substrate; (c) again feeding saidprinting substrate towards said printing apparatus, and locating thefirst pattern (A) and the second pattern (B); and (d) determining amatrix of roto-translation between patterns A and B, thereby determininga matrix of roto-translation between said first predefined reference andsaid second predefined reference.
 15. The method according to claim 12,wherein said first predefined reference is the reference system of asecond acquisition means.
 16. The method according to claim 12, whereinsaid second predefined reference is either a reference system of a saidprinting support bar, or a reference system of a plurality of printingsupport bars.
 17. The method according to claim 12 wherein the method isa computer implemented method.
 18. A system for digital printing onprinting substrates, comprising: (a) an insertion interface configuredto receive a digital image to be printed on at least one printingsubstrate; (b) a conveyor surface configured to convey a printingsubstrate with a random orientation towards a printing apparatus at aselectable speed and in a predefined direction; said printing apparatuscomprising at least one printing support bar which supports a pluralityof print heads configured to print said digital image on said at leastone printing substrate; (c) a locating device, positioned on an infeedside of said apparatus, and configured to locate said at least oneprinting substrate moving with a random orientation on said conveyorsurface, according to claim 8, thereby determining location coordinatesof said printing substrate relative to a first predefined reference; and(d) a processing unit, in data connection with said printing apparatusand with said locating device, comprising a rotation module configuredto rotate said digital image as a function of said positioningcoordinates of said printing substrate, thereby determining a rotateddigital print image for said printing substrate, wherein said pluralityof print heads is configured to print said digital image on said atleast one printing substrate, maintaining the orientation of saidprinting medium unchanged relative to a second predefined reference. 19.The system according to claim 18, wherein said processing unit comprisesan alignment module configured to align the first predefined referencewith the second predefined reference.
 20. The system according to claim18, wherein said first predefined reference is a reference system of asecond acquisition means.
 21. The system according to claim 18, whereinsaid second predefined reference is either a reference system of a saidprinting support bar or a reference system of a plurality of printingsupport bars.